#define __display_c

#include    "includeAll.h"

code const uint8_t displayFonts[10] =
{
    0x3f,  /*0*/
    0x06,  /*1*/
    0x5b,  /*2*/
    0x4f,  /*3*/
    0x66,  /*4*/
    0x6d,  /*5*/
    0x7d,  /*6*/
    0x07,  /*7*/
    0x7f,  /*8*/
    0x6f,  /*9*/
};

void DisplayScan(void)
{
clr_led_1;
clr_led_2;
clr_led_3;
clr_led_4;
clr_led_5;
clr_led_6;
clr_led_7;
clr_led_8;

setLedUp; 	
setLedDown;
setLedPower;	
setLedMoShi	;
	
//setLedYuYue ;

 setTempH=setCurTemp/10;
        setTempL=setCurTemp%10;
	d_seg=displayFonts[setTempH];
    if(f_seg_a)    {set_led_7a;  }
    if(f_seg_b)    {set_led_7b;  }
    if(f_seg_c)    {set_led_7c;  }
    if(f_seg_d)    {set_led_7d;  }
    if(f_seg_e)    {set_led_7e;  }
    if(f_seg_f)    {set_led_7f;  }
    if(f_seg_g)    {set_led_7g;  }

    d_seg=displayFonts[setTempL];
    if(f_seg_a)    {set_led_8a;}
    if(f_seg_b)    {set_led_8b;}
    if(f_seg_c)    {set_led_8c;}
    if(f_seg_d)    {set_led_8d;}
    if(f_seg_e)    {set_led_8e;}
    if(f_seg_f)    {set_led_8f;}
    if(f_seg_g)    {set_led_8g;}
	setSheZhiWenDu;
	setled78Flag;
        curTempH=curTemp/10;
        curTempL=curTemp%10;
        d_seg=displayFonts[curTempH];
        if(f_seg_a)   { set_led_1a;}
        if(f_seg_b)   { set_led_1b;}
        if(f_seg_c)   { set_led_1c;}
        if(f_seg_d)   { set_led_1d;}
        if(f_seg_e)   { set_led_1e;}
        if(f_seg_f)   { set_led_1f;}
        if(f_seg_g)   { set_led_1g;}

        d_seg=displayFonts[curTempL];
        if(f_seg_a)   {set_led_2a;  }
        if(f_seg_b)   {set_led_2b;  }
        if(f_seg_c)   {set_led_2c;  }
        if(f_seg_d)   {set_led_2d;  }
        if(f_seg_e)   {set_led_2e;  }
        if(f_seg_f)   {set_led_2f;  }
        if(f_seg_g)   {set_led_2g;  }
		
      setNeiDanWenDu;
	  setled12Flag;
		clockHourH=mainClockHour/10;
        clockHourL=mainClockHour%10;
        clockMinH =mainClockMin/10;
        clockMinL =mainClockMin%10;
		
		orderClockOpenHourH=orderClockOpenHour/10;
        orderClockOpenHourL=orderClockOpenHour%10;
        orderClockOpenMinH =orderClockOpenMin/10;
        orderClockOpenMinL =orderClockOpenMin%10;
		
		if((modeNum==4)||(modeNum==5))
		{
			d_seg=displayFonts[orderClockOpenHourH];
        if(f_seg_a)   {set_led_3a; }
        if(f_seg_b)   {set_led_3b; }
        if(f_seg_c)   {set_led_3c; }
        if(f_seg_d)   {set_led_3d; }
        if(f_seg_e)   {set_led_3e; }
        if(f_seg_f)   {set_led_3f; }
        if(f_seg_g)   {set_led_3g; }
		
		d_seg=displayFonts[orderClockOpenHourL];
		if(f_seg_a)    {set_led_4a;   }
        if(f_seg_b)    {set_led_4b;   }
        if(f_seg_c)    {set_led_4c;   }
        if(f_seg_d)    {set_led_4d;   }
        if(f_seg_e)    {set_led_4e;   }
        if(f_seg_f)    {set_led_4f;   }
        if(f_seg_g)    {set_led_4g;   }
		
		d_seg=displayFonts[orderClockOpenMinH];
	    if(f_seg_a)   {set_led_5a;  }
        if(f_seg_b)   {set_led_5b;  }
        if(f_seg_c)   {set_led_5c;  }
        if(f_seg_d)   {set_led_5d;  }
        if(f_seg_e)   {set_led_5e;  }
        if(f_seg_f)   {set_led_5f;  }
        if(f_seg_g)   {set_led_5g;  }
		
		
		d_seg=displayFonts[orderClockOpenMinL];
		if(f_seg_a)   { set_led_6a;    }
        if(f_seg_b)   { set_led_6b;    }
        if(f_seg_c)   { set_led_6c;    }
        if(f_seg_d)   { set_led_6d;    }
        if(f_seg_e)   { set_led_6e;    }
        if(f_seg_f)   { set_led_6f;    }
        if(f_seg_g)   { set_led_6g;    }
		}
		else
		{
		d_seg=displayFonts[clockHourH];
        if(f_seg_a)   {set_led_3a; }
        if(f_seg_b)   {set_led_3b; }
        if(f_seg_c)   {set_led_3c; }
        if(f_seg_d)   {set_led_3d; }
        if(f_seg_e)   {set_led_3e; }
        if(f_seg_f)   {set_led_3f; }
        if(f_seg_g)   {set_led_3g; }
		
		d_seg=displayFonts[clockHourL];
		if(f_seg_a)    {set_led_4a;   }
        if(f_seg_b)    {set_led_4b;   }
        if(f_seg_c)    {set_led_4c;   }
        if(f_seg_d)    {set_led_4d;   }
        if(f_seg_e)    {set_led_4e;   }
        if(f_seg_f)    {set_led_4f;   }
        if(f_seg_g)    {set_led_4g;   }
		
		d_seg=displayFonts[clockMinH];
	    if(f_seg_a)   {set_led_5a;  }
        if(f_seg_b)   {set_led_5b;  }
        if(f_seg_c)   {set_led_5c;  }
        if(f_seg_d)   {set_led_5d;  }
        if(f_seg_e)   {set_led_5e;  }
        if(f_seg_f)   {set_led_5f;  }
        if(f_seg_g)   {set_led_5g;  }
		
		
		d_seg=displayFonts[clockMinL];
		if(f_seg_a)   { set_led_6a;    }
        if(f_seg_b)   { set_led_6b;    }
        if(f_seg_c)   { set_led_6c;    }
        if(f_seg_d)   { set_led_6d;    }
        if(f_seg_e)   { set_led_6e;    }
        if(f_seg_f)   { set_led_6f;    }
        if(f_seg_g)   { set_led_6g;    }
		}
			// if(powerNum==1)
	// {
		// setPower1;
		// clrPower2;
		// clrPower3;
	// }
	// else if(powerNum==2)
	// {
		// clrPower1;
		// setPower2;
		// clrPower3;
	// }
	// else if(powerNum==3)
	// {
		// clrPower1;
		// clrPower2;
		// setPower3;
	// }
	
	if(bPower)
	{
	
		if(flashSetYuYue<=0)
		{
			 if(bSaveTemp==0)
		{
			setJiaRe;
			clrBaoWen;
			bHuaSa=0;
			clrHuaSa1;	
			clrHuaSa2;	
			clrHuaSa3;	
			clrHuaSa4;
		}
		else
		{
			bHuaSa=1;
			clrJiaRe;
			setBaoWen;
		}
		}
		
		
	}
	else
	{
		if(flashSetYuYue<=0)
		{
				F_clrPowerL;
       F_clrPowerH;
		bHuaSa=0;
		huaSaNum=0;
		clrBaoWen;
		clrJiaRe;
		clrHuaSa1;	
			clrHuaSa2;	
			clrHuaSa3;	
			clrHuaSa4;
		}
	
	}
	if(bHuaSa)
	{
		if(bOrderOpen==1)
		{
			huaSaNum=0;
		}
		switch(huaSaNum)
		{
			case 0:
			clrHuaSa1;	
			clrHuaSa2;	
			clrHuaSa3;	
			clrHuaSa4;	
			break;
			case 1:
			setHuaSa1	;
			clrHuaSa2	;
			clrHuaSa3	;
			clrHuaSa4	;
			
			break;
			case 2:
			setHuaSa1;	
			setHuaSa2;	
			clrHuaSa3;	
			clrHuaSa4;	
			break;
			case 3:
			setHuaSa1;	
			setHuaSa2;	
			setHuaSa3;	
			clrHuaSa4;	
			break;
			case 4:
			setHuaSa1;	
			setHuaSa2;	
			setHuaSa3;	
			setHuaSa4;	
			break;
		}
	}
	
		if((flashSetYuYue<=0)&&(flashSetMode<=0))
		{
			if(bSecFlash500ms)
			{
				clrClockFlag;
			}
			else
			{
				setClockFlag;
			}
		}
		else
		{
			setClockFlag;
		}
	
	
			if((modeNum==4)||(modeNum==5))
		{
			SetYuYueShiJian;
		}
		else
		{
			ClrYuYueShiJian;
		}
		if((bOrderOpen)&&(modeNum==1))
		{
			SetYuYueShiJian;
		}
		if((bOrderOpen)&&(flashSetMode<=0))
		{
			SetYuYueShiJian;
			clrBaoWen;
			clrJiaRe;
		}
       
}